<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>BLP2.0: /Applications/MAMP/htdocs/Workspace/blp2.0/system/helpers/string_helper.php File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">BLP2.0
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">/Applications/MAMP/htdocs/Workspace/blp2.0/system/helpers/string_helper.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespace_code_igniter"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_code_igniter.html">CodeIgniter</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a006e718dc1169a55ffb0679350b0a4f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('trim_slashes')) <br class="typebreak"/>
<a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('strip_slashes')) <br class="typebreak"/>
<a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('strip_quotes')) <br class="typebreak"/>
<a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('quotes_to_entities')) <br class="typebreak"/>
<a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('reduce_double_slashes')) <br class="typebreak"/>
<a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('reduce_multiples')) <br class="typebreak"/>
<a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a>(!function_exists('random_string'))&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="string__helper_8php.html#a006e718dc1169a55ffb0679350b0a4f5">increment_string</a> ($str, $separator= '_', $first=1)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a006e718dc1169a55ffb0679350b0a4f5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('trim_slashes')) <a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('strip_slashes')) <a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('strip_quotes')) <a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('quotes_to_entities')) <a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('reduce_double_slashes')) <a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('reduce_multiples')) <a class="el" href="_code_igniter_8php.html#a8d119d888af4f356541728c61143967b">if</a> (!function_exists('random_string')) <a class="el" href="string__helper_8php.html#a006e718dc1169a55ffb0679350b0a4f5">increment_string</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>separator</em> = <code>'_'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>first</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Trim Slashes</p>
<p>Removes any leading/trailing slashes from a string:</p>
<p>/this/that/theother/</p>
<p>becomes:</p>
<p>this/that/theother</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string Strip Slashes</dd></dl>
<p>Removes slashes contained in a string or in an array</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mixed</td><td>string or array </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>mixed string or array Strip Quotes</dd></dl>
<p>Removes single and double quotes from a string</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string Quotes to Entities</dd></dl>
<p>Converts single and double quotes to entities</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string Reduce Double Slashes</dd></dl>
<p>Converts double slashes in a string to a single slash, except those found in <a href="http://">http://</a></p>
<p><a href="http://www.some-site.com//index.php">http://www.some-site.com//index.php</a></p>
<p>becomes:</p>
<p><a href="http://www.some-site.com/index.php">http://www.some-site.com/index.php</a></p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string Reduce Multiples</dd></dl>
<p>Reduces multiple instances of a particular character. Example:</p>
<p>Fred, Bill,, Joe, Jimmy</p>
<p>becomes:</p>
<p>Fred, Bill, Joe, Jimmy</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td></td></tr>
    <tr><td class="paramname">string</td><td>the character you wish to reduce </td></tr>
    <tr><td class="paramname">bool</td><td>TRUE/FALSE - whether to trim the character from the beginning/end </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string Create a Random String</dd></dl>
<p>Useful for generating passwords or hashes.</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>type of random string. basic, alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1 </td></tr>
    <tr><td class="paramname">integer</td><td>number of characters </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string Add's _1 to a string or increment the ending number to allow _2, _3, etc</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$str</td><td>required </td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$separator</td><td>What should the duplicate number be appended with </td></tr>
    <tr><td class="paramtype">string</td><td class="paramname">$first</td><td>Which number should be used for the first dupe increment </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string </dd></dl>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 14 2012 15:49:53 for BLP2.0 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
